/**
 * 数字转分钟
 */
export const numToMinute = (num: number) => {
  const minute = `${Math.floor(num / 60)}`.padStart(2, "0");
  const second = `${Math.floor(num % 60)}`.padStart(2, "0");
  return `${minute}:${second}`;
};

/**
 * 数字转小时
 */
export const numToHour = (num: number) => {
  const hour = `${Math.floor(num / (60 * 60))}`.padStart(2, "0");
  return `${hour}:${numToMinute(num % (60 * 60))}`;
};

/**
 * 数字转天
 */
export const numToDay = (num: number) => {
  const day = `${Math.floor(num / (60 * 60 * 24))}`;
  return `${day}:${numToHour(num % (60 * 60 * 24))}`;
};

/**
 * 获取两个数字中间的所有数字
 */
export const getArrByNum = (start: number, end: number) => {
  const arr: number[] = [];
  for (let i = start; i <= end; i++) {
    arr.push(i);
  }
  return arr;
};
